gtk4.git
8 years agoGtkFileChooserNativeQuartz: add support for GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
Tom Schoonjans [Mon, 3 Jul 2017 11:54:39 +0000 (12:54 +0100)]
GtkFileChooserNativeQuartz: add support for GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER

Which is via NSOpenPanel, not NSSavePanel...

https://bugzilla.gnome.org/show_bug.cgi?id=784723

8 years agoGtkFilechooserNative: add macOS support
Tom Schoonjans [Fri, 30 Jun 2017 20:34:05 +0000 (21:34 +0100)]
GtkFilechooserNative: add macOS support

Based on the Win32 implementation, as well as the macOS file chooser
from
https://github.com/GNOME/gedit/blob/master/gedit/gedit-file-chooser-dialog-osx.[ch]
Not fully tested yet, but working properly so far.
TODO: filter support, extra widget (label), documentation...

https://bugzilla.gnome.org/show_bug.cgi?id=784723

8 years agoDrop gtk-doc trigraphs on GtkTextView enumeration
Emmanuele Bassi [Sun, 16 Jul 2017 11:33:24 +0000 (12:33 +0100)]
Drop gtk-doc trigraphs on GtkTextView enumeration

The glib-mkenums tool does not recognise these gtk-doc annotations.

8 years agoFixes to Catalan translation
Jordi Mas [Sat, 15 Jul 2017 07:37:29 +0000 (09:37 +0200)]
Fixes to Catalan translation

8 years agoimage: Warn when attempting to load pixdata GResources
Bastien Nocera [Wed, 5 Jul 2017 21:01:26 +0000 (23:01 +0200)]
image: Warn when attempting to load pixdata GResources

GdkPixdata is deprecated. Warn when the application tries to load
pixdata embedded resources. The application developer will have to
remove the "to-pixdata" keyword from the GResource definition file.

https://bugzilla.gnome.org/show_bug.cgi?id=781583

8 years agoUse newer glib-genmarshal to simplify build rules
Emmanuele Bassi [Tue, 11 Jul 2017 10:39:59 +0000 (11:39 +0100)]
Use newer glib-genmarshal to simplify build rules

The glib-genmarshal tool from GLib 2.54 added various command line
arguments that allow us to remove a bunch of as hoc manipulations of
the generated marshaller source files. The marshal generator tool can
now include an header in the source, and undef the G_ENABLE_DEBUG
pre-processor symbol for us. It can also generate the prototypes of the
marshallers in the C source, and avoid a 'missing-prototypes' compiler
warning.

8 years agoUpdated Hebrew translation
Yosef Or Boczko [Mon, 10 Jul 2017 09:52:20 +0000 (12:52 +0300)]
Updated Hebrew translation

8 years agoUpdated Hebrew translation
Yosef Or Boczko [Mon, 10 Jul 2017 09:50:11 +0000 (12:50 +0300)]
Updated Hebrew translation

8 years agoAvoid a race in the print portal
Matthias Clasen [Sun, 2 Jul 2017 00:14:15 +0000 (20:14 -0400)]
Avoid a race in the print portal

Same as the previous commit; use the new predictable request
object path to connect to the Response signal early.

8 years agoAvoid a race in the file chooser portal
Matthias Clasen [Sat, 1 Jul 2017 23:13:03 +0000 (19:13 -0400)]
Avoid a race in the file chooser portal

Use the new predictable request object path and connect
to the Response signal before issuing the portal call.
This avoids a race that is pretty unlikely to hit in
the filechooser case.

8 years agolabel: Remove extra quote in code example
Daniel Boles [Fri, 7 Jul 2017 07:13:41 +0000 (08:13 +0100)]
label: Remove extra quote in code example

8 years agoGdkRGBA: Fix misspelt parameter names in docs
Daniel Boles [Thu, 6 Jul 2017 13:03:08 +0000 (14:03 +0100)]
GdkRGBA: Fix misspelt parameter names in docs

8 years agoGdkRGBA: Fix typo precentage => percentage
Daniel Boles [Thu, 6 Jul 2017 12:59:53 +0000 (13:59 +0100)]
GdkRGBA: Fix typo precentage => percentage

8 years agox11: Assign GDK_SOURCE_TABLET_PAD when necessary
Jason Gerecke [Tue, 27 Jun 2017 21:21:05 +0000 (14:21 -0700)]
x11: Assign GDK_SOURCE_TABLET_PAD when necessary

Wacom tablets often have a "pad" device which houses multiple buttons. At
present, these devices are incorrectly marked as GDK_SOURCE_PEN which can
cause problems for some software.

https://bugzilla.gnome.org/show_bug.cgi?id=782040

8 years agocss-overview: Don’t document deleted pseudoclasses
Daniel Boles [Thu, 22 Jun 2017 22:56:44 +0000 (23:56 +0100)]
css-overview: Don’t document deleted pseudoclasses

Commit b52966a318a26589b26598be9cda1628c04db3ff stopped the parser from
handling various deprecated pseudoclasses, which were aliases of others,
but it did not update the documentation to reflect that they were gone.

8 years agocss-overview: Fix typo “{with=>which} is disabled”
Daniel Boles [Thu, 22 Jun 2017 19:40:06 +0000 (20:40 +0100)]
css-overview: Fix typo “{with=>which} is disabled”

8 years agoUpdate Kazakh translation
Baurzhan Muftakhidinov [Thu, 22 Jun 2017 14:32:27 +0000 (14:32 +0000)]
Update Kazakh translation

8 years agoUpdated Czech translation
Marek Cernocky [Tue, 20 Jun 2017 12:33:39 +0000 (14:33 +0200)]
Updated Czech translation

8 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 19 Jun 2017 15:36:06 +0000 (17:36 +0200)]
Updated Spanish translation

8 years agogdk: Set vid/pid on wayland tablets
Carlos Garnacho [Fri, 16 Jun 2017 16:21:34 +0000 (18:21 +0200)]
gdk: Set vid/pid on wayland tablets

This was missed so far... Use %.4x format, in order to behave just
the same than X11.

8 years agoheaderbar: fix "widow" typo in docs
Will Thompson [Thu, 15 Jun 2017 14:53:18 +0000 (15:53 +0100)]
headerbar: fix "widow" typo in docs

8 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Wed, 14 Jun 2017 05:48:33 +0000 (07:48 +0200)]
Updated Norwegian bokmål translation

8 years agoGtkActionHelper: Remove unnecessary NULL check
Debarshi Ray [Tue, 13 Jun 2017 09:06:50 +0000 (11:06 +0200)]
GtkActionHelper: Remove unnecessary NULL check

This NULL check has existed since commit 652f16dd985dbc1b, when
GtkActionHelper was first introduced, but so has the assertion at the
top to ensure the validity of 'widget'.

https://bugzilla.gnome.org/show_bug.cgi?id=783587

8 years agoGtkActionHelper: Allow a NULL action-name to unset the previous GAction
Debarshi Ray [Fri, 9 Jun 2017 10:15:53 +0000 (12:15 +0200)]
GtkActionHelper: Allow a NULL action-name to unset the previous GAction

https://bugzilla.gnome.org/show_bug.cgi?id=783587

8 years agofile chooser: Don't pass NULL as title to the portal
Matthias Clasen [Tue, 13 Jun 2017 17:09:56 +0000 (13:09 -0400)]
file chooser: Don't pass NULL as title to the portal

This causes critical warnings.

8 years agogtk/Makefile.am: Fix 'make dist'
Chun-wei Fan [Mon, 12 Jun 2017 10:14:57 +0000 (18:14 +0800)]
gtk/Makefile.am: Fix 'make dist'

We don't have gtkcenterboxprivate.h anymore, as it became a public
header...

8 years agoUpdate POTFILES.in
Piotr Drąg [Sun, 11 Jun 2017 14:57:47 +0000 (16:57 +0200)]
Update POTFILES.in

8 years agolabel: Provide a baseline in all cases
Matthias Clasen [Sun, 11 Jun 2017 14:35:06 +0000 (10:35 -0400)]
label: Provide a baseline in all cases

The label measuring code was only determining baselines
when the label was set to wrap, which does not seem right.
Non-wrapping labels have a meaningful baseline as well,
report it back.

8 years agocenter box: Take baseline-position fully into account
Matthias Clasen [Sat, 10 Jun 2017 18:45:10 +0000 (14:45 -0400)]
center box: Take baseline-position fully into account

We need to take baseline-position into account during measure
as well.

8 years agoUpdate Friulian translation
Fabio Tomat [Sat, 10 Jun 2017 16:07:52 +0000 (16:07 +0000)]
Update Friulian translation

8 years agoUpdate Friulian translation
Fabio Tomat [Sat, 10 Jun 2017 13:23:50 +0000 (13:23 +0000)]
Update Friulian translation

8 years agocenter box: complete the baseline support
Matthias Clasen [Sat, 10 Jun 2017 13:14:16 +0000 (09:14 -0400)]
center box: complete the baseline support

When there is no externally allocated baseline, we should
do the same thing that GtkBox does, and determine one from
the children that want baseline alignment.

This commit adds a GtkCenterBox::baseline-position property
with setters and getters.

8 years agocenter box: Fix size allocation
Matthias Clasen [Sat, 10 Jun 2017 11:52:01 +0000 (07:52 -0400)]
center box: Fix size allocation

This missing pair of parens was causing expanding children
to overlap.

8 years agocenter box: Drop a useless line
Matthias Clasen [Sat, 10 Jun 2017 11:51:25 +0000 (07:51 -0400)]
center box: Drop a useless line

This is just a leftover that has no effect whatsoever.

8 years agoUpdate Friulian translation
Fabio Tomat [Sat, 10 Jun 2017 09:58:18 +0000 (09:58 +0000)]
Update Friulian translation

8 years agoUpdate Friulian translation
Fabio Tomat [Sat, 10 Jun 2017 09:43:40 +0000 (09:43 +0000)]
Update Friulian translation

8 years agoUpdate Friulian translation
Fabio Tomat [Fri, 9 Jun 2017 07:51:06 +0000 (07:51 +0000)]
Update Friulian translation

8 years agoUpdate Friulian translation
Fabio Tomat [Thu, 8 Jun 2017 22:39:28 +0000 (22:39 +0000)]
Update Friulian translation

8 years agoicon-theme: Show filename attempted when icon fails to load
Robert Ancell [Thu, 8 Jun 2017 00:08:22 +0000 (12:08 +1200)]
icon-theme: Show filename attempted when icon fails to load

8 years agoiconhelper: Show error if fail to load placeholder icon
Robert Ancell [Wed, 7 Jun 2017 23:29:09 +0000 (11:29 +1200)]
iconhelper: Show error if fail to load placeholder icon

8 years agoAdd some translator comments
Matthias Clasen [Thu, 8 Jun 2017 19:05:55 +0000 (15:05 -0400)]
Add some translator comments

These were requested in
https://bugzilla.gnome.org/show_bug.cgi?id=783552

8 years agoUpdate Friulian translation
Fabio Tomat [Thu, 8 Jun 2017 14:48:47 +0000 (14:48 +0000)]
Update Friulian translation

8 years agoUpdate Friulian translation
Fabio Tomat [Thu, 8 Jun 2017 11:44:09 +0000 (11:44 +0000)]
Update Friulian translation

8 years agoprintunixdialog: Update collate icon as entry changes
Felipe Borges [Thu, 18 May 2017 14:11:56 +0000 (16:11 +0200)]
printunixdialog: Update collate icon as entry changes

By relying on GtkSpinButton default activation behavior, the
collate icon doesn't get updated when a new number is typed
in the copies spin button.

https://bugzilla.gnome.org/show_bug.cgi?id=759308

8 years agoUpdate Friulian translation
Fabio Tomat [Wed, 7 Jun 2017 10:35:28 +0000 (10:35 +0000)]
Update Friulian translation

8 years agoUpdate Friulian translation
Fabio Tomat [Tue, 6 Jun 2017 22:42:06 +0000 (22:42 +0000)]
Update Friulian translation

8 years agowidget: Fix gtk_widget_insert_after/before() docs
Kjell Ahlstedt [Tue, 6 Jun 2017 12:57:52 +0000 (14:57 +0200)]
widget: Fix gtk_widget_insert_after/before() docs

Add beginning double asterisks and function names. Correct the parameter
names (next/previous_child -> next/previous_sibling). Make the documentation
of the two functions more similar.

https://bugzilla.gnome.org/show_bug.cgi?id=783445

8 years agoInstall gtkcenterbox.h
Matthias Clasen [Tue, 6 Jun 2017 01:09:30 +0000 (21:09 -0400)]
Install gtkcenterbox.h

8 years agomodules/input/gtkimcontextime.c: Move to set_client_widget
Chun-wei Fan [Sat, 27 May 2017 02:38:19 +0000 (10:38 +0800)]
modules/input/gtkimcontextime.c: Move to set_client_widget

The imcontext internals have been changed to use set_client_widget
instead of set_client_window in order to remove API dependency on
GdkWindow.  Update the Windows IME support so that the code will
continue to build and work.

https://bugzilla.gnome.org/show_bug.cgi?id=773299

8 years agogdk/gdkvulkancontext.c: Fix 32-bit Windows builds
Chun-wei Fan [Mon, 5 Jun 2017 14:17:12 +0000 (22:17 +0800)]
gdk/gdkvulkancontext.c: Fix 32-bit Windows builds

The callback function that is used by VkDebugReportCallbackCreateInfoEXT
is decorated with VKAPI_CALL (which is __stdcall on Windows).  This is
not detected on x64 Windows as __stdcall is not really meaningful on x64
Windows, and VKAPI_CALL expands to nothing on non-Windows.

As __stdcall functions are treated differently on 32-bit Windows, the
32-bit compiler does require that the function be declared as __stdcall
so that things will compile, link and run properly.

https://bugzilla.gnome.org/show_bug.cgi?id-773299

8 years agoUpdate Friulian translation
Fabio Tomat [Mon, 5 Jun 2017 13:04:26 +0000 (13:04 +0000)]
Update Friulian translation

8 years agogtktextdisplay: remove unused code
Nelson Benítez León [Sun, 4 Jun 2017 06:20:19 +0000 (11:20 +0500)]
gtktextdisplay: remove unused code

In render_para() function, which is called for every text line that
needs to be drawn.

https://bugzilla.gnome.org/show_bug.cgi?id=783397

8 years agocenter box: Add more documentation
Matthias Clasen [Mon, 5 Jun 2017 01:48:41 +0000 (21:48 -0400)]
center box: Add more documentation

8 years agoAdd a simple center box test
Matthias Clasen [Sat, 3 Jun 2017 13:08:44 +0000 (09:08 -0400)]
Add a simple center box test

Just a simple use of this widget.

8 years agocenter box: add baseline support
Matthias Clasen [Sun, 4 Jun 2017 19:57:58 +0000 (15:57 -0400)]
center box: add baseline support

This is copied more or less directly from GtkBoxGadget.

8 years agocenter box : implement GtkOrientable
Matthias Clasen [Sun, 4 Jun 2017 17:28:43 +0000 (13:28 -0400)]
center box : implement GtkOrientable

This is generally expected of containers where it makes sense.

8 years agocenter box: support height-for-width
Matthias Clasen [Sun, 4 Jun 2017 14:11:42 +0000 (10:11 -0400)]
center box: support height-for-width

Implement request modes fully.

8 years agocenter box: Support expand property
Matthias Clasen [Sun, 4 Jun 2017 02:44:19 +0000 (22:44 -0400)]
center box: Support expand property

We expand the center child first, but only as far
as we can keep it centered.

8 years agocenter box: implement GtkBuildable
Matthias Clasen [Sat, 3 Jun 2017 20:04:57 +0000 (16:04 -0400)]
center box: implement GtkBuildable

Make it possible to fill the slots by using the
type attribute on child nodes. This is necessary
since GtkCenterBox does not derive from GtkContainer.

8 years agocenter box: implement natural size and rtl flipping
Matthias Clasen [Sat, 3 Jun 2017 19:56:01 +0000 (15:56 -0400)]
center box: implement natural size and rtl flipping

We prefer to give the center widget its natural size,
and we center it as long as possible.

8 years agocenter box: handle missing start or end widgets
Matthias Clasen [Sat, 3 Jun 2017 17:17:19 +0000 (13:17 -0400)]
center box: handle missing start or end widgets

Any slot may be unfilled, not just the center one.

8 years agoMake GtkCenterBox public
Matthias Clasen [Fri, 2 Jun 2017 00:56:32 +0000 (17:56 -0700)]
Make GtkCenterBox public

It provides functionality that GtkBox used to have,
and is generally useful.

8 years agoUpdate Friulian translation
Fabio Tomat [Sun, 4 Jun 2017 12:10:53 +0000 (12:10 +0000)]
Update Friulian translation

8 years agodist icon.list
Matthias Clasen [Sat, 3 Jun 2017 02:28:27 +0000 (22:28 -0400)]
dist icon.list

Otherwise things will not work in a release tarball.

8 years agoicon-browser: Add a few icons
Matthias Clasen [Fri, 2 Jun 2017 21:42:04 +0000 (14:42 -0700)]
icon-browser: Add a few icons

These have appeared recently.

8 years agoicon browser: Make icons a bit larger
Matthias Clasen [Fri, 2 Jun 2017 20:57:58 +0000 (13:57 -0700)]
icon browser: Make icons a bit larger

Use 48x48 in the list, instead of 32x32. We have the space.

8 years agoicon browser: Add a 'copy to clipboard' button
Matthias Clasen [Fri, 2 Jun 2017 19:39:39 +0000 (12:39 -0700)]
icon browser: Add a 'copy to clipboard' button

This makes it more obvious how to use the icon.

8 years agoicon browser: put icons as data
Matthias Clasen [Fri, 2 Jun 2017 01:52:50 +0000 (18:52 -0700)]
icon browser: put icons as data

Instead of hardcoding all the add_icon calls,
read the icon list from a keyfile, for easier
extensibility.

8 years agowayland: selectively cancel key repeat on key release
Dan Torop [Thu, 13 Apr 2017 14:37:22 +0000 (10:37 -0400)]
wayland: selectively cancel key repeat on key release

Under Wayland, when multiple keys are pressed and the user releases a
key, key repeat should continue unless the key released is the one
currently repeating.

In the case of:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key2 repeat
- key2 release

The behavior should be to cancel keyboard repeat, though key1 is still
held down. This is consistent with prior X11/XWayland behavior.

The following also must work:

- key1 press
- key2 press
- key2 release
- key2 press
- key1 release
- key2 should continue to repeat

The fix for bug #778019 should continue to work:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key1 release
- key2 should repeat

The choice to change the counter nkeys to the flag repeat_active
helps to solve the second test case.

https://bugzilla.gnome.org/show_bug.cgi?id=781285

8 years agowayland: fix xdg_surface test in move/resize drag
Olivier Fourdan [Fri, 2 Jun 2017 13:54:50 +0000 (15:54 +0200)]
wayland: fix xdg_surface test in move/resize drag

begin_resize_drag() and begin_move_drag() check for xdg_surface being
not null, but those apply on xdg_toplevel so they should check for
xdg_toplevel being non-null instead.

https://bugzilla.gnome.org/show_bug.cgi?id=781945

8 years agowayland: check parent surface for subsurface
Olivier Fourdan [Tue, 16 May 2017 14:13:34 +0000 (16:13 +0200)]
wayland: check parent surface for subsurface

When an event is received while a tooltip is showing, the GtkTooltip's
event handling code can end up calling gdk_window_set_transient_for()
from gtk_tooltip_set_last_window().

The Wayland GDK backend will try to automatically create a subsurface
in gdk_wayland_window_set_transient_for() but if the parent surface is
gone meanwhile, this will will cause a crash when trying to create a
subsurface from a parent with a null surface.

Checking for the parent is not sufficient, we ought to check for the
parent surface as well to avoid the crash.

https://bugzilla.gnome.org/show_bug.cgi?id=782283

8 years agowayland: Do not map toplevel utility as popup
Olivier Fourdan [Tue, 2 May 2017 09:41:26 +0000 (11:41 +0200)]
wayland: Do not map toplevel utility as popup

Applications can specify the type hint as utility even on toplevel
windows.

When that toplevel is also marked as a transient for another window,
GDK Wayland backend would translate that as an xdg_popup which is not
appropriate.

While utility temp windows should remain mapped as subsurfaces (such as
the ones used by treeviews), regular windows should not translate as
neither a subsurface nor an xdg_popup.

https://bugzilla.gnome.org/show_bug.cgi?id=781945

8 years agogtkfilechoosernativewin32: Fix support for non-ASCII paths
Christoph Reiter [Fri, 2 Jun 2017 10:55:23 +0000 (12:55 +0200)]
gtkfilechoosernativewin32: Fix support for non-ASCII paths

The code used SIGDN_URL to get an URL for the selected item, but Windows URLs
are a mix of unicode and percent encoded characters in the locale encoding
and not something GFile can understand. The result is a garbage file
path.

Instead use SIGDN_FILESYSPATH to get a real file path if available.

Also checks the return value of g_utf16_to_utf8 because file paths on
Windows can contain lone surrogates which would make the conversion fail.

https://bugzilla.gnome.org/show_bug.cgi?id=783347

8 years agomeson: Rebuild the SCSS-based themes if sassc is available
Emmanuele Bassi [Thu, 1 Jun 2017 13:56:32 +0000 (14:56 +0100)]
meson: Rebuild the SCSS-based themes if sassc is available

If we have sassc installed then we want to rebuild the themes that use
SCSS whenever one of their dependencies change.

8 years agoAdwaita: Add missing rule for fullscreen headerbar
Daniel Boles [Wed, 31 May 2017 17:48:11 +0000 (18:48 +0100)]
Adwaita: Add missing rule for fullscreen headerbar

Another selector forces round corners for headerbars in a stack, and it
has higher priority than the selector covering the non-stack case from
commit 796f9b5bfb0f356b06515d25203e3bcd00c80687. Totem’s MainToolbar
happens to be in a stack, and we should maintain symmetry here anyway.

So, as window classes .maximized and .tiled are excluded from this other
selector, the newly handled .fullscreen case must be excluded here also.

https://bugzilla.gnome.org/show_bug.cgi?id=770513

8 years agoHighContrast: Regenerate CSS files with sassc
Daniel Boles [Wed, 31 May 2017 17:47:57 +0000 (18:47 +0100)]
HighContrast: Regenerate CSS files with sassc

8 years agoHighContrast: Update parse-sass.sh; remove Gemfile
Daniel Boles [Wed, 31 May 2017 17:45:24 +0000 (18:45 +0100)]
HighContrast: Update parse-sass.sh; remove Gemfile

Make parse-sass.sh use sassc instead of the old Ruby method.

8 years agothemes: Square corners on fullscreen win headerbar
Daniel Boles [Wed, 31 May 2017 07:16:51 +0000 (08:16 +0100)]
themes: Square corners on fullscreen win headerbar

Totem uses a fullscreen window with a headerbar at the top, and without
this change, that headerbar has rounded corners, which look different
from a maximised window and let video content show through beneath.

https://bugzilla.gnome.org/show_bug.cgi?id=770513

8 years agoHighContrast: Restore files to regenerate CSS
Daniel Boles [Wed, 31 May 2017 07:14:26 +0000 (08:14 +0100)]
HighContrast: Restore files to regenerate CSS

I think parse-sass.sh needs updated to match what Adwaita does now, but
for now, this is sufficient to let us regenerate HighContrast again.

8 years agogdk/gtk: Fix Since tags for 3.92 symbols
Rico Tzschichholz [Tue, 30 May 2017 13:10:25 +0000 (15:10 +0200)]
gdk/gtk: Fix Since tags for 3.92 symbols

In addition to 406db15066f121c2b9910691f92e5841b30e0311

8 years agowayland: Don't warn if the display is lost, skip exit handlers
Debarshi Ray [Wed, 24 May 2017 14:42:01 +0000 (16:42 +0200)]
wayland: Don't warn if the display is lost, skip exit handlers

There is no need to have every application log a warning when the
Wayland display server goes away, and we are using _exit instead of
exit elsewhere.

This is also what the X11 backend does (see gdk_x_io_error).

https://bugzilla.gnome.org/show_bug.cgi?id=745289

8 years agogdk/gtk: Fix more AVAILABLE_IN annotations to 3_92
Daniel Boles [Sun, 28 May 2017 13:19:14 +0000 (14:19 +0100)]
gdk/gtk: Fix more AVAILABLE_IN annotations to 3_92

8 years agogdkevents.h: Fix version annotations on new funcs
Daniel Boles [Sat, 27 May 2017 14:25:35 +0000 (15:25 +0100)]
gdkevents.h: Fix version annotations on new funcs

8 years agogtk: Make GtkPointerFocus refcounted
Carlos Garnacho [Thu, 25 May 2017 14:00:40 +0000 (16:00 +0200)]
gtk: Make GtkPointerFocus refcounted

In order to make it really sure the GtkPointerFocus is valid while being
removed from a GtkWindow.

8 years agogtkwidget: Lookup the event target when cancelling GdkEventSequences
Carlos Garnacho [Wed, 24 May 2017 23:59:40 +0000 (01:59 +0200)]
gtkwidget: Lookup the event target when cancelling GdkEventSequences

We were getting the toplevel most often here, so the gestures weren't
properly cleaned up.

8 years agogtk: Check implicit grab status before sending crossing events
Carlos Garnacho [Wed, 24 May 2017 23:57:22 +0000 (01:57 +0200)]
gtk: Check implicit grab status before sending crossing events

As we now refrain from sending the crossing events if there's an
implicit grab, those events must be sent on button release when
the implicit grab is broken.

8 years agogtk: Refactor crossing event synthesization into a separate function
Carlos Garnacho [Wed, 24 May 2017 23:50:38 +0000 (01:50 +0200)]
gtk: Refactor crossing event synthesization into a separate function

This is now called outside update_pointer_focus_state() with the events
that actually matter (i.e. pointer ones, so no sequence == NULL checks)

8 years agogtk: Rework pointer cursor selection
Carlos Garnacho [Wed, 24 May 2017 23:45:18 +0000 (01:45 +0200)]
gtk: Rework pointer cursor selection

Check the grab widget (both explicit and implicit) and check for a cursor
from the target widget up to this grab widget. If the target widget is
outside the grab widget, only the grab wigdet's cursor will be checked.

This also means that we have to ensure the cursor is updated on button
releases, as an implicit grab being deactivated must trigger a cursor
lookup from the target widget.

8 years agogtktreeview: Fix invalidation coordinates
Carlos Garnacho [Wed, 24 May 2017 16:30:35 +0000 (18:30 +0200)]
gtktreeview: Fix invalidation coordinates

We must account for the widget allocation now that there is no view_window.

8 years agogtkiconview: Fix invalidation coordinates
Carlos Garnacho [Wed, 24 May 2017 16:30:25 +0000 (18:30 +0200)]
gtkiconview: Fix invalidation coordinates

We must account for the widget allocation now that there is no view_window.

8 years agogtkgesture: Consume button release/touch end events if gesture was claimed
Carlos Garnacho [Wed, 24 May 2017 16:22:00 +0000 (18:22 +0200)]
gtkgesture: Consume button release/touch end events if gesture was claimed

In these situations we must perform the "is it claimed" check before removing
the (touch)point, as doing so when the gesture is empty will be too late if
the gesture actually claimed input.

8 years agomain: Automatically (un)set PRELIGHT state on widgets
Timm Bäder [Sun, 21 May 2017 07:27:57 +0000 (09:27 +0200)]
main: Automatically (un)set PRELIGHT state on widgets

8 years agoGesture: Remove window property completely
Timm Bäder [Sat, 20 May 2017 07:00:07 +0000 (09:00 +0200)]
Gesture: Remove window property completely

These are just leftovers, it's already gone from public API and the
_{set,get}_property implementations.

8 years agogtk: Fix event delivery on GTK_PHASE_TARGET controllers
Carlos Garnacho [Mon, 15 May 2017 11:44:33 +0000 (13:44 +0200)]
gtk: Fix event delivery on GTK_PHASE_TARGET controllers

Look up the event target, not the "event widget" which is based on the
event window, and thus points to the toplevel.

8 years agogdk: Remove synthetic crossing event emission due to geometry changes
Carlos Garnacho [Sun, 14 May 2017 19:34:15 +0000 (21:34 +0200)]
gdk: Remove synthetic crossing event emission due to geometry changes

This just applied to child windows, but now GDK should just take care of
toplevels, which shall get crossing events from the windowing when the right
conditions apply.

Removing this code fixes confused crossing state in widgets and messed up
window_under_pointer tracking (Which now is meant to be toplevels) when any
of the remaining child GdkWindows trigger these crossing events.

8 years agogdk: Ensure to implicitly deactivate grabs when an impl window is hidden
Carlos Garnacho [Sun, 14 May 2017 19:30:16 +0000 (21:30 +0200)]
gdk: Ensure to implicitly deactivate grabs when an impl window is hidden

For some reason this wasn't done on windows with an impl, but it totally should.
Probably hidden by grabs in menus and somesuch being done on a child window.

8 years agogtkpopover: Use event coordinates right away to detect clicks outside.
Carlos Garnacho [Fri, 12 May 2017 10:42:48 +0000 (12:42 +0200)]
gtkpopover: Use event coordinates right away to detect clicks outside.

There's no need anymore to translate coordinates, the event already contains
popover-relative ones.

8 years agogtkwindow: Implement ::pick to extend picking to popovers.
Carlos Garnacho [Fri, 12 May 2017 10:38:04 +0000 (12:38 +0200)]
gtkwindow: Implement ::pick to extend picking to popovers.

This makes interaction possible with popovers again.

8 years agowidget: Make sure we're not calling _get_parent on NULL
Timm Bäder [Wed, 10 May 2017 16:08:43 +0000 (18:08 +0200)]
widget: Make sure we're not calling _get_parent on NULL

We already issue the first _get_parent call before even entering that
loop, so make sure `parent` is not NULL. This happens when event_widget
is already a toplevel, and this change fixes row-dragging in treeviews.

8 years agoConstify GdkEvent parameters in gtk_get_event_widget and _event_target
Timm Bäder [Wed, 10 May 2017 16:03:10 +0000 (18:03 +0200)]
Constify GdkEvent parameters in gtk_get_event_widget and _event_target